<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


    <script>

        var arr = ['it','bai','zhan'];
        console.log(arr.indexOf('bai')); //1
        console.log(arr.indexOf('it')); //0

        console.log(arr.indexOf('hello')); //-1

    </script>


</body>
</html>